package cn.lg.soar.boot.fc.entity;

import cn.lg.soar.core.annotations.constraints.group.*;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.*;
import io.swagger.annotations.*;
import lombok.Data;
import java.util.List;
import javax.validation.constraints.*;

import cn.lg.soar.database.base.entity.BaseEntity;

/**
 * 配套表
 * @author BoBo
 * @since 2025-01-15
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Data
@ApiModel(value = "Furniture", description = "配套表")
@TableName("fc_furniture")
public class Furniture extends BaseEntity {

    /**  */
    @NotNull(message = "主键不能为空", groups = { Update.class })
    @ExcelIgnore
    @ApiModelProperty(value = "主键")
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 配套名称 */
    @NotBlank(message = "配套名称不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "配套名称")
    @ApiModelProperty(value = "配套名称")
    private String name;

    /** 配套规格 */
    @ExcelProperty(value = "配套规格")
    @ApiModelProperty(value = "配套规格")
    private String standard;

    /** 配套厂家 */
    @ExcelProperty(value = "配套厂家")
    @ApiModelProperty(value = "配套厂家")
    private String manufacturer;

    /** 配套类型 */
    @ExcelProperty(value = "配套类型")
    @ApiModelProperty(value = "配套类型")
    private String type;

    /** 配套状态(1-未配置 2-已配置 3-使用中) */
    @ExcelProperty(value = "配套状态(1-未配置 2-已配置 3-使用中)")
    @ApiModelProperty(value = "配套状态(1-未配置 2-已配置 3-使用中)")
    private Integer state;

    /** 配套图片 */
    @ExcelProperty(value = "配套图片")
    @ApiModelProperty(value = "配套图片")
    private String img;

    //前台上传图片集合
    @ExcelProperty(value = "配套图片")
    @ApiModelProperty(value = "配套图片")
    //接收前台参数传递，下面配置是这个参数不会被持久化到数据库
    @TableField(exist = false)
    private List<String> imgList;

    /** 配套年限 */
    @ExcelProperty(value = "配套年限")
    @ApiModelProperty(value = "配套年限")
    private String duration;

    /** 总配套数量 */
    @NotNull(message = "总配套数量不能为空", groups = { Update.class })
    @ExcelProperty(value = "总配套数量")
    @ApiModelProperty(value = "总配套数量")
    private Integer futotla;

    /** 已配套数量 */
    @ExcelProperty(value = "已配套数量")
    @ApiModelProperty(value = "已配套数量")
    private Integer fuinuse;

    /** 总配套数量 */
    @ExcelProperty(value = "剩余配套数量")
    @ApiModelProperty(value = "剩余配套数量")
    private Integer furemain;

    /** 排序 */
    @ExcelProperty(value = "排序")
    @ApiModelProperty(value = "排序")
    private Integer orders;

    /** 扩展字段1 */
    @ExcelProperty(value = "扩展字段1")
    @ApiModelProperty(value = "扩展字段1")
    private String extend1;

    /** 扩展字段2 */
    @ExcelProperty(value = "扩展字段2")
    @ApiModelProperty(value = "扩展字段2")
    private String extend2;

    /** 扩展字段3 */
    @ExcelProperty(value = "扩展字段3")
    @ApiModelProperty(value = "扩展字段3")
    private String extend3;

    /** 乐观锁 */
    @ExcelProperty(value = "乐观锁")
    @ApiModelProperty(value = "乐观锁")
    private Integer version;

    @JsonIgnore
    @Override
    public Long primaryKey() {
        return this.id;
    }

}
